VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.MDIForm frmMain 
   BackColor       =   &H80000004&
   Caption         =   "Isodial Utility"
   ClientHeight    =   8520
   ClientLeft      =   165
   ClientTop       =   1020
   ClientWidth     =   12945
   Icon            =   "frmMain.frx":0000
   LinkTopic       =   "MDIForm1"
   Picture         =   "frmMain.frx":058A
   Begin VB.PictureBox picSfondo 
      Align           =   1  'Align Top
      Height          =   15
      Left            =   0
      ScaleHeight     =   15
      ScaleWidth      =   12945
      TabIndex        =   0
      Top             =   0
      Width           =   12945
      Begin VB.Frame fraDx 
         Height          =   2055
         Left            =   6960
         TabIndex        =   3
         Top             =   0
         Width           =   5895
         Begin VB.ComboBox cboTipo 
            Enabled         =   0   'False
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   315
            ItemData        =   "frmMain.frx":CCDF
            Left            =   1920
            List            =   "frmMain.frx":CCEF
            Style           =   2  'Dropdown List
            TabIndex        =   11
            Top             =   840
            Width           =   3615
         End
         Begin VB.CheckBox chkUnSoloTipo 
            Caption         =   "Utenti di tipo"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Left            =   120
            TabIndex        =   10
            Top             =   840
            Width           =   1575
         End
         Begin VB.PictureBox picData 
            AutoSize        =   -1  'True
            BorderStyle     =   0  'None
            Height          =   360
            Index           =   0
            Left            =   2160
            ScaleHeight     =   360
            ScaleWidth      =   360
            TabIndex        =   5
            ToolTipText     =   "Cerca data"
            Top             =   240
            Width           =   360
         End
         Begin VB.PictureBox picData 
            AutoSize        =   -1  'True
            BorderStyle     =   0  'None
            Height          =   360
            Index           =   1
            Left            =   5280
            ScaleHeight     =   360
            ScaleWidth      =   360
            TabIndex        =   4
            ToolTipText     =   "Cerca data"
            Top             =   240
            Width           =   360
         End
         Begin VB.Label Label1 
            AutoSize        =   -1  'True
            Caption         =   "Dal"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   195
            Index           =   2
            Left            =   120
            TabIndex        =   9
            Top             =   330
            Width           =   300
         End
         Begin VB.Label Label1 
            AutoSize        =   -1  'True
            Caption         =   "Al"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   195
            Index           =   5
            Left            =   3480
            TabIndex        =   8
            Top             =   330
            Width           =   180
         End
         Begin VB.Label lblData 
            Alignment       =   2  'Center
            BackColor       =   &H80000009&
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   1
            Left            =   3960
            TabIndex        =   7
            Top             =   285
            Width           =   1215
         End
         Begin VB.Label lblData 
            Alignment       =   2  'Center
            BackColor       =   &H80000009&
            BorderStyle     =   1  'Fixed Single
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   255
            Index           =   0
            Left            =   840
            TabIndex        =   6
            Top             =   285
            Width           =   1215
         End
      End
      Begin VB.Frame fraSx 
         Height          =   2055
         Left            =   120
         TabIndex        =   1
         Top             =   0
         Width           =   6855
         Begin MSFlexGridLib.MSFlexGrid flxUtenti 
            Height          =   1695
            Left            =   120
            TabIndex        =   2
            Top             =   240
            Width           =   6615
            _ExtentX        =   11668
            _ExtentY        =   2990
            _Version        =   393216
            Cols            =   5
            FixedCols       =   0
            ScrollTrack     =   -1  'True
            FormatString    =   "| Nome                      | Cognome                  | Tipo                         | Eliminato  "
         End
      End
   End
   Begin MSComctlLib.StatusBar staBar 
      Align           =   2  'Align Bottom
      Height          =   375
      Left            =   0
      TabIndex        =   12
      Top             =   8145
      Width           =   12945
      _ExtentX        =   22834
      _ExtentY        =   661
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   5
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Alignment       =   1
            AutoSize        =   2
            Object.Width           =   7064
            MinWidth        =   7056
            Text            =   " ISODIAL UTILITY 1.3.6"
            TextSave        =   " ISODIAL UTILITY 1.3.6"
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Alignment       =   1
            Object.Width           =   4058
            MinWidth        =   4058
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Alignment       =   1
            Object.Width           =   4058
            MinWidth        =   4058
         EndProperty
         BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Alignment       =   1
            Object.Width           =   4058
            MinWidth        =   4058
            Text            =   "Controllo dati"
            TextSave        =   "Controllo dati"
         EndProperty
         BeginProperty Panel5 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   6
            Alignment       =   1
            AutoSize        =   1
            Object.Width           =   4058
            MinWidth        =   4058
            TextSave        =   "03/11/2011"
         EndProperty
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   500
      Top             =   5000
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   18
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":CD22
            Key             =   "s_Key1"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":12944
            Key             =   "s_Key2"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":12A9E
            Key             =   "s_Key3"
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":12BF8
            Key             =   "s_Key4"
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":12D52
            Key             =   "s_Key5"
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":12FE4
            Key             =   "s_Key6"
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":13276
            Key             =   "s_Key7"
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":133D0
            Key             =   "s_Key8"
         EndProperty
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":1352A
            Key             =   "s_Key9"
         EndProperty
         BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":13684
            Key             =   "s_Key10"
         EndProperty
         BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":1399E
            Key             =   "s_Key11"
         EndProperty
         BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":13AF8
            Key             =   "s_Key12"
         EndProperty
         BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":13E1A
            Key             =   "s_Key13"
         EndProperty
         BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":14134
            Key             =   ""
         EndProperty
         BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":14606
            Key             =   ""
         EndProperty
         BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":14B48
            Key             =   ""
         EndProperty
         BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":14CA2
            Key             =   ""
         EndProperty
         BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":14DFC
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.ImageList imgLstCalendario 
      Left            =   10000
      Top             =   5000
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      MaskColor       =   12632256
      _Version        =   393216
   End
   Begin VB.Menu mnuModificheMain 
      Caption         =   "&Modifiche"
      Tag             =   "&Modifiche|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      Begin VB.Menu mnuModifiche 
         Caption         =   "Anamnesi &Dialitiche"
         Index           =   1
         Tag             =   "Anamnesi &Dialitiche|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
      Begin VB.Menu mnuModifiche 
         Caption         =   "Anamnesi &Nefrologiche"
         Index           =   2
         Tag             =   "Anamnesi &Nefrologiche|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
      Begin VB.Menu mnuModifiche 
         Caption         =   "Anamnesi &Patologiche"
         Index           =   3
         Tag             =   "Anamnesi &Patologiche|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
      Begin VB.Menu mnuModifiche 
         Caption         =   "Esami &Strumentali"
         Index           =   4
         Tag             =   "Esami &Strumentali|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
      Begin VB.Menu mnuModifiche 
         Caption         =   "Esami &Laboratorio"
         Index           =   5
         Tag             =   "Esami &Laboratorio|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
      Begin VB.Menu mnuModifiche 
         Caption         =   "&Terapie Domiciliari"
         Index           =   6
         Tag             =   "&Terapie Domiciliari|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
      Begin VB.Menu mnuModifiche 
         Caption         =   "Te&rapie Dialitiche"
         Index           =   7
         Tag             =   "Te&rapie Dialitiche|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
      Begin VB.Menu mnuModifiche 
         Caption         =   "&Accessi vascolari"
         Index           =   8
         Tag             =   "&Accessi vascolari|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
      Begin VB.Menu mnuModifiche 
         Caption         =   "Diari C&linici"
         Index           =   9
         Tag             =   "Diari C&linici|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
      Begin VB.Menu mnuModifiche 
         Caption         =   "&Colture"
         Index           =   10
         Tag             =   "&Colture|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
      Begin VB.Menu mnuModifiche 
         Caption         =   "Rico&veri"
         Index           =   11
         Tag             =   "Rico&veri|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
      Begin VB.Menu mnuModifiche 
         Caption         =   "Epis&odi"
         Index           =   12
         Tag             =   "Epis&odi|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
      Begin VB.Menu mnuModifiche 
         Caption         =   "Tras&fusioni"
         Index           =   13
         Tag             =   "Tras&fusioni|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
      Begin VB.Menu mnuModifiche 
         Caption         =   "Sieroconversio&ni"
         Index           =   14
         Tag             =   "Sieroconversio&ni|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
   End
   Begin VB.Menu mnuElimina 
      Caption         =   "&Eliminazioni"
      Tag             =   "&Eliminazioni|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      Begin VB.Menu mnuEliminazioni 
         Caption         =   "Esami &strumentali"
         Index           =   1
         Tag             =   "Esami &strumentali|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
      Begin VB.Menu mnuEliminazioni 
         Caption         =   "Esami di &laboratorio"
         Index           =   2
         Tag             =   "Esami di &laboratorio|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
      Begin VB.Menu mnuEliminazioni 
         Caption         =   "&Terapie Dialitiche"
         Index           =   3
         Tag             =   "&Terapie|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
      Begin VB.Menu mnuEliminazioni 
         Caption         =   "Terapia &Domiciliari"
         Index           =   4
      End
      Begin VB.Menu mnuEliminazioni 
         Caption         =   "&Utenti"
         Index           =   5
         Tag             =   "&Utenti|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
   End
   Begin VB.Menu mnuAccessi 
      Caption         =   "&Accessi"
      Tag             =   "&Accessi|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
   End
   Begin VB.Menu mnuVisualizza 
      Caption         =   "&Visualizza"
      Tag             =   "&Visualizza|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      Begin VB.Menu mnuOrizzontale 
         Caption         =   "Affianca &Orizzontalmente"
         Index           =   4
         Tag             =   "Affianca &Orizzontalmente|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
      Begin VB.Menu mnuVerticalmente 
         Caption         =   "Affianca &Verticalmente"
         Index           =   4
         Tag             =   "Affianca &Verticalmente|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
      Begin VB.Menu mnuSovrapponi 
         Caption         =   "&Sovrapponi"
         Index           =   4
         Tag             =   "&Sovrapponi|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
      Begin VB.Menu mnuSep 
         Caption         =   "-"
         Index           =   4
         Tag             =   "-|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
      Begin VB.Menu mnuFinestre 
         Caption         =   "&Finestre"
         Index           =   4
         Tag             =   "&Finestre|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
      Begin VB.Menu mnuSep2 
         Caption         =   "-"
         Index           =   4
         Tag             =   "-|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
      Begin VB.Menu mnuChiudiTutte 
         Caption         =   "&Chiudi tutte"
         Index           =   4
         Tag             =   "&Chiudi tutte|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
   End
   Begin VB.Menu mnuInfo 
      Caption         =   "?"
      Tag             =   "?|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      Begin VB.Menu mnuAbout 
         Caption         =   "&About"
         Index           =   4
         Tag             =   "&About|(Checked=0)(Enabled=-1)(Visible=-1)(WindowList=0)"
      End
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub MDIForm_Load()


    '/ If gbSubClassMenu is False, the menu is not subclassed
    gbSubClassMenu = True

    If gbSubClassMenu Then SubClassMenuXP

    Dim i As Integer
    With flxUtenti
        .ColWidth(0) = 0
        .Row = 0
        For i = 1 To 4
            .Col = i
            .CellFontBold = True
        Next i
    End With
    stoRicaricando = False
    numFormAperti = 0
    numFormAttivo = 0
    Call CaricaUtenti
    Call CaricaImg
    
    Me.Top = 100
    Me.Left = (Screen.Width - Me.Width) / 2
End Sub

Private Sub MDIForm_Unload(Cancel As Integer)


    If gbSubClassMenu Then
        '/ prevent error if the menu is not subclassed
        On Error Resume Next
        '/ release object
        Call objMenuEx.Uninstall(Me.hWnd, ImageList1, MenuEvents)
        Set MenuEvents = Nothing
        Set objMenuEx = Nothing
    End If
    
    Set cnCentro = Nothing
    Set cnPrinc = Nothing
    
    On Error Resume Next
    Dim ret As Double
    ' smonta il volume
    ret = Shell(structApri.pathTrueCrypt & "\TrueCrypt.exe /d X /q /s /f", vbHide)
End Sub

Public Sub MouseWheel(flx As MSFlexGrid, ByVal MouseKeys As Long, ByVal Rotation As Long, ByVal Xpos As Long, ByVal Ypos As Long)
    Dim NewValue As Long
    Dim Lstep As Single

    On Error Resume Next
    With flx
        Lstep = .Height / .RowHeight(0)
        Lstep = Int(Lstep)
        If Lstep < 10 Then
            Lstep = 10
        End If
        If Rotation > 0 Then
            NewValue = .TopRow - Int(Lstep / 3)
            If NewValue < 1 Then
                NewValue = 1
            End If
        Else
            NewValue = .TopRow + Int(Lstep / 3)
            If NewValue > .Rows - 1 Then
                NewValue = .Rows - 1
            End If
        End If
        .TopRow = NewValue
    End With
End Sub

Public Sub CaricaUtenti(Optional condizione As String = "")
    ' carica tutti gli utenti
    Dim rsDataset As New Recordset
    Dim riga As Integer
    riga = 0
    flxUtenti.Rows = 1
    rsDataset.Open "SELECT * FROM LOGIN " & condizione, cnPrinc, adOpenForwardOnly, adLockReadOnly, adCmdText
    Do While Not rsDataset.EOF
        riga = riga + 1
        With flxUtenti
            .Rows = riga + 1
            .TextMatrix(riga, 0) = rsDataset("KEY")
            .TextMatrix(riga, 1) = rsDataset("NOME")
            .TextMatrix(riga, 2) = rsDataset("COGNOME")
            .TextMatrix(riga, 3) = Choose(rsDataset("TIPO"), "Medico", "Infermiere", "Contabile", "Amministratore")
            .TextMatrix(riga, 4) = IIf(rsDataset("ELIMINATO"), "Si", "No")
        End With
        rsDataset.MoveNext
    Loop
    Set rsDataset = Nothing
    flxUtenti.Row = 0
End Sub

Private Sub CaricaImg()
    ' carica le icone dal file di risorse
    Dim i As Integer
    imgLstCalendario.ListImages.Add 1, , LoadResPicture("cal1", 0)
    imgLstCalendario.ListImages.Add 2, , LoadResPicture("cal2", 0)
    For i = 0 To 1
        picData(i).Picture = imgLstCalendario.ListImages(1).Picture
    Next i
End Sub

Private Sub flxUtenti_GotFocus()
    Call WheelHook(Me, flxUtenti)
End Sub

Private Sub flxUtenti_LostFocus()
    Call WheelUnHook
End Sub

Private Sub flxUtenti_Click()
    If Not VerificaClickFlx(flxUtenti) Then
        ' discolora
        Call ColoraFlx(flxUtenti, flxUtenti.Cols - 1, vbWhite)
        ' annulla le row e col
        flxUtenti.Row = 0
        flxUtenti.Col = 0
    Else
        Call ColoraFlx(flxUtenti, flxUtenti.Cols - 1)
    End If
    If numFormAttivo <> 0 And numFormAperti <> 0 Then
        Forms(numFormAttivo).lblFiltro = flxUtenti.Row
    End If
End Sub

Private Sub cboTipo_Click()
    If Not stoRicaricando Then
        If numFormAttivo <> 0 And numFormAperti <> 0 Then
            Forms(numFormAttivo).lblFiltro = "OKTIPO " & cboTipo.ListIndex
        End If
    End If
End Sub

Private Sub chkUnSoloTipo_Click()
    If Not stoRicaricando Then
        cboTipo.Enabled = (chkUnSoloTipo.Value = Checked)
        If chkUnSoloTipo.Value = Checked Then
            cboTipo.ListIndex = 0
        Else
            cboTipo.ListIndex = -1
        End If
    End If
End Sub

Private Sub lblData_Change(Index As Integer)
    If Not stoRicaricando Then
        If numFormAttivo <> 0 And numFormAperti <> 0 Then
            Forms(numFormAttivo).lblFiltro = lblData(Index).Caption
        End If
    End If
End Sub

Private Sub lblData_Click(Index As Integer)
    lblData(Index) = ""
    laData = vbNull
End Sub

Private Sub mnuAbout_Click(Index As Integer)
    frmInfo.Show 1
End Sub



Private Sub mnuAccessi_Click()
    frmAccessi.Show
End Sub

Private Sub mnuChiudiTutte_Click(Index As Integer)
    Dim Form As Form
    For Each Form In Forms
        If Form.Name <> Me.Name Then
            Unload Form
        End If
    Next
End Sub

Private Sub mnuModifiche_Click(Index As Integer)
    tModifiche = Index
    Unload frmModifiche
    frmModifiche.Show
End Sub

Private Sub mnuOrizzontale_Click(Index As Integer)
    Me.Arrange vbTileHorizontal
End Sub

Private Sub mnuSovrapponi_Click(Index As Integer)
    Me.Arrange vbCascade
End Sub

Private Sub mnuVerticalmente_Click(Index As Integer)
    Me.Arrange vbTileVertical
End Sub

Private Sub picData_Click(Index As Integer)
    frmCalendario.Show 1
    If Not IsNull(laData) Then
        lblData(Index) = laData
    End If
End Sub

Private Sub picData_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
    picData(Index).Picture = imgLstCalendario.ListImages(2).Picture
End Sub

Private Sub picData_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
    picData(Index).Picture = imgLstCalendario.ListImages(1).Picture
End Sub



Private Sub mnuEliminazioni_Click(Index As Integer)
    tEliminazione = Index
    Unload frmEliminazioni
    frmEliminazioni.Show
End Sub


Private Sub MenuEvents_MenuHelp(ByVal MenuText As String, ByVal MenuHelp As String, ByVal Enabled As Boolean)
    If gbSubClassMenu Then
        '/ this event show Decription menu-item to a StatusBar control
        '/ customize for your project, if you need this.
        '/ Note: MenuText contain the menu Caption.
        '/       MenuHelp contain the Description string.
        '/ example: sbStatusBar.Panels(1).text = MenuHelp
        '/          lblMenuHelp.Caption = MenuHelp
    End If
End Sub
Public Sub SubClassMenuXP()

    '/ this code is made by MenuCreator add-in

    '/ prepare the caption for subclassing. Warning! Don't remove this comment!!!
    mnuModificheMain.Caption = "&Modifiche"
          mnuModifiche(1).Caption = "Anamnesi &Dialitiche"
          mnuModifiche(2).Caption = "Anamnesi &Nefrologiche"
          mnuModifiche(3).Caption = "Anamnesi &Patologiche"
          mnuModifiche(4).Caption = "Esami &Strumentali"
          mnuModifiche(5).Caption = "Esami &Laboratorio"
          mnuModifiche(6).Caption = "&Terapie Domiciliari"
          mnuModifiche(7).Caption = "Te&rapie Dialitiche"
          mnuModifiche(8).Caption = "&Accessi vascolari"
          mnuModifiche(9).Caption = "Diari C&linici"
          mnuModifiche(10).Caption = "&Colture"
          mnuModifiche(11).Caption = "Rico&veri"
          mnuModifiche(12).Caption = "Epis&odi"
          mnuModifiche(13).Caption = "Tras&fusioni"
          mnuModifiche(14).Caption = "Sieroconversio&ni"
    mnuElimina.Caption = "&Eliminazioni"
          mnuEliminazioni(1).Caption = "Esami &strumentali"
          mnuEliminazioni(2).Caption = "Esami di &laboratorio"
          mnuEliminazioni(3).Caption = "&Terapie Dialitiche"
          mnuEliminazioni(4).Caption = "Terapie &Domiciliari"
          mnuEliminazioni(5).Caption = "&Utenti"
    mnuAccessi.Caption = "&Accessi"
    mnuVisualizza.Caption = "&Visualizza"
          mnuOrizzontale(4).Caption = "Affianca &Orizzontalmente"
          mnuVerticalmente(4).Caption = "Affianca &Verticalmente"
          mnuSovrapponi(4).Caption = "&Sovrapponi"
          mnuSep(4).Caption = "-"
          mnuFinestre(4).Caption = "&Finestre"
          mnuSep2(4).Caption = "-"
          mnuChiudiTutte(4).Caption = "&Chiudi tutte"
    mnuInfo.Caption = "?"
          mnuAbout(4).Caption = "&About"


    '/ Subclassing menu. Warning! Don't remove this comment!!!

    Set MenuEvents = New CEvents
    Set objMenuEx = New cMenuEx
    Call objMenuEx.Install(Me.hWnd, App.Path & "\" & Me.Name, ImageList1, 2, MenuEvents)
  
End Sub

Public Sub MenuDesigner()
    '/ Open Menu Designer tool
    objMenuEx.MenuDesigner Me.hWnd
End Sub

